#include <iostream>
#include <unordered_map>
#define int unsigned long long
using namespace std;
const int mod = 1e9 + 7;

signed main()
{
    int n; cin >> n;
    unordered_map<int, int> cnt;
    while(n--)
    {
        int cur; cin >> cur;
        for(int i = 2; i <= cur / i; ++i)
            while(cur % i == 0)
            {
                cur /= i;
                cnt[i]++;
            }
        if(cur > 1) cnt[cur]++;
    }
    int ans = 1;
    for(auto e : cnt)
    {
        // int tmp = 0;
        // for(int i = 0, cur = 1; i <= e.second; ++i)
        // {
        //     tmp = (tmp + cur) % mod;
        //     cur = cur * e.first % mod;
        // }
        // ans = (ans * tmp) % mod;
        int p = e.first, a = e.second, t = 1;
        while(a--) t = (t * p + 1) % mod;  // 秦九韶算法
        ans = (ans * t) % mod;
    }
    cout << ans;
    return 0;
}